# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc1
pkgver=1.3.1
pkgrel=1
pkgdesc="Multiprecision C library"
url="http://www.multiprecision.org/"
arch="all"
license="LGPL-3.0-or-later"
makedepends_host="gmp-dev mpfr-dev>=4.1.0-r0"
makedepends="$makedepends_host"
subpackages="$pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/mpc/mpc-$pkgver.tar.gz"

builddir="$srcdir"/mpc-$pkgver

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-sysroot="$CBUILDROOT" \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-shared
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97  mpc-1.3.1.tar.gz
"
